﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="LoginFormControl.ascx.cs" Inherits="LMIS_Application.controls.LoginFormControl" %>
<link href="~/style/controlStyles.css" rel="Stylesheet" />
<script runat="server">
    private string username;
    private string password;
    private int numAttempts;
    public string Username
    {
        get
        {
            return this.username;
        }
        set
        {
            if (value.Length >= 5)
            {
                this.username = value;
            }
            else
            {
                throw new Exception("Username must be at least 5 characters");
            }
        }
    }
    public string Password
    {
        get
        {
            return this.password;
        }
        set
        {
            if (value.Length >= 5)
            {
                this.password = value;
            }
            else
            {
                throw new Exception("Password must be at least 5 characters");
            }
        }   
    }
    public void OnSubmit()
    {
        //TODO: Implement code to handle form submit.
    }
    
</script>

<div id="uc_login">
    <h3>Login</h3>
    <p>
        <label for="tb_user" accesskey="u">Username</label>
        <asp:TextBox ID="tb_user" runat="server" TextMode="SingleLine" />
    </p>
    <p>
        <label for="tb_pass" accesskey="p">Password</label>
        <asp:TextBox ID="tb_pass" runat="server" TextMode="Password" />
    </p>
    <p>
        <asp:Button ID="btn_submit" runat="server" Text="Login" />
    </p>
</div>
